home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-08-18 | 3.4 KB | 159 lines | [TEXT/R*ch] |
- local
- open Fnlib Mixture Const Globals Location Types;
- in
-
- datatype IdKindDesc =
- VARik
- | PRIMik of PrimInfo
- | CONik of ConInfo
- | EXCONik of ExConInfo
- ;
-
- type IdKind = IdKindDesc global;
-
- type IdDesc =
- {
- idLoc : Location,
- withOp : bool,
- idKind : IdKind ref
- };
-
- type IdInfo = IdDesc global;
-
- type TyVar = IdInfo;
-
- datatype Ty' =
- TYVARty of TyVar
- | RECty of Ty Row
- | CONty of Ty list * IdInfo
- | FNty of Ty * Ty
- withtype Ty = Location * Ty'
- ;
-
- datatype VarExpInfo =
- RESve of IdInfo
- | OVLve of IdInfo * OvlType * Type
- ;
-
- datatype Pat' =
- SCONpat of SCon * Type option ref
- | VARpat of IdInfo
- | WILDCARDpat
- | NILpat of IdInfo
- | CONSpat of IdInfo * Pat
- | EXNILpat of IdInfo
- | EXCONSpat of IdInfo * Pat
- | EXNAMEpat of IdInfo (* This is a hack to be used in match(.sml) *)
- | REFpat of Pat
- | RECpat of RecPat ref
- | VECpat of Pat list
- | INFIXpat of Pat list
- | PARpat of Pat
- | TYPEDpat of Pat * Ty
- | LAYEREDpat of Pat * Pat
-
- and RecPat =
- RECrp of Pat Row * RowType option
- | TUPLErp of Pat list
-
- withtype Pat = Location * Pat'
- ;
-
- datatype Exp' =
- SCONexp of SCon * Type option ref
- | VARexp of VarExpInfo ref
- | RECexp of RecExp ref
- | VECexp of Exp list
- | LETexp of Dec * Exp
- | PARexp of Exp
- | APPexp of Exp * Exp
- | INFIXexp of Exp list
- | TYPEDexp of Exp * Ty
- | ANDALSOexp of Exp * Exp
- | ORELSEexp of Exp * Exp
- | HANDLEexp of Exp * Match
- | RAISEexp of Exp
- | IFexp of Exp * Exp * Exp
- | WHILEexp of Exp * Exp
- | FNexp of Match
- | SEQexp of Exp * Exp
-
- and RecExp =
- RECre of Exp Row
- | TUPLEre of Exp list
-
- and MRule = MRule of Pat list * Exp
-
- and Dec' =
- VALdec of TyVar list * (ValBind list * ValBind list)
- | PRIM_VALdec of PrimValBind list
- | FUNdec of TyVar list * FValBind list
- | TYPEdec of TypBind list
- | PRIM_TYPEdec of TyNameEqu * TypDesc list
- | DATATYPEdec of DatBind list * TypBind list option
- | ABSTYPEdec of DatBind list * TypBind list option * Dec
- | EXCEPTIONdec of ExBind list
- | LOCALdec of Dec * Dec
- | OPENdec of string list
- | EMPTYdec
- | SEQdec of Dec * Dec
- | FIXITYdec of InfixStatus * string list
-
- and ValBind = ValBind of Pat * Exp
-
- and FClause = FClause of Pat list * Exp
-
- and ConBind = ConBind of IdInfo * Ty option
-
- and ExBind =
- EXDECexbind of IdInfo * Ty option
- | EXEQUALexbind of IdInfo * IdInfo
-
- withtype Exp = Location * Exp'
-
- and Match = MRule list
-
- and Dec = Location * Dec'
-
- and PrimValBind = IdInfo * Ty * int * string
-
- and FValBind = Location * FClause list
-
- and TypBind = TyVar list * IdInfo * Ty
-
- and TypDesc = TyVar list * IdInfo
-
- and DatBind = TyVar list * IdInfo * ConBind list
- ;
-
- type ValDesc = IdInfo * Ty;
- type ExDesc = IdInfo * Ty option;
-
- datatype Spec' =
- VALspec of ValDesc list
- | PRIM_VALspec of PrimValBind list
- | TYPEDESCspec of TyNameEqu * TypDesc list
- | TYPEspec of TypBind list
- | DATATYPEspec of DatBind list * TypBind list option
- | EXCEPTIONspec of ExDesc list
- | LOCALspec of Spec * Spec
- | OPENspec of string list
- | EMPTYspec
- | SEQspec of Spec * Spec
- withtype Spec = Location * Spec';
-
- type LocString = Location * string;
-
- datatype Sig =
- NamedSig of {locsigid : LocString, specs : Spec list}
- | AnonSig of Spec list;
-
- datatype Struct =
- NamedStruct of {locstrid : LocString, locsigid : LocString option,
- decs : Dec list}
- | Abstraction of {locstrid : LocString, locsigid : LocString,
- decs : Dec list}
- | AnonStruct of Dec list
-
- end;
-